// api/paper2/template.js
import request from '@/utils/request'

export function pageTemplate(params) {
  return request({
    url: '/paper2/template/page',
    method: 'get',
    params
  })
}

export function getTemplate(id) {
  return request({
    url: `/paper2/template/${id}`,
    method: 'get'
  })
}

export function saveTemplate(data) {
  console.log(data)
  return request({
    url: '/paper2/template',
    method: data.id ? 'put' : 'post',
    data
  })
}

export function deleteTemplate(ids) {
  return request({
    url: '/paper2/template/' + ids.join(','),
    method: 'delete'
  })
}
